//
//  DemoViewController.swift
//  SinaWeiBo
//
//  Created by Leon 笑 竹 on 2017/8/1.
//  Copyright © 2017年 Leon 笑 竹. All rights reserved.
//

import UIKit

class DemoViewController: BaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        self.title = "第 \(navigationController?.childViewControllers.count ?? 0) 个"
        
    }

    func nextBtn()  {
        let vc = DemoViewController()
        navigationController?.pushViewController(vc, animated: true)
    }
    
}

extension DemoViewController{
    
    override func setupTableView() {
        //重写父类方法
        super.setupTableView()
                
        naviItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", fontSize: 16, target: self, action: #selector(nextBtn),isBack : false)
        
//        save_userDefaults(key: "string", value: "haha" as AnyObject)
//        print(load_userDefaults(key: "string"))
    }
}
